package com.gitee.wsl.scheduler.task

import kotlinx.coroutines.Deferred
import kotlinx.coroutines.InternalForInheritanceCoroutinesApi

@OptIn(InternalForInheritanceCoroutinesApi::class)
interface AsyncSchedulerTask<T,D: Deferred<T>>: SchedulerTask {
    val job: D
    override fun cancel() = job.cancel()

    override val isCancelled: Boolean
        get() = job.isCancelled
}